import request from '@/utils/request'

export function login(username, password) {
    return request({
        url: `/changgou-auth/auth/login`,
        method: 'post',
        data: {
            username,
            password
        }
    })
}

export function getInfo(token) {
    return request({
        url: '/changgou-sys/sys/user/getInfo',
        method: 'get',
        params: { token }
    })
}

export function logout() {
    return request({
        url: '/changgou-auth/auth/logout',
        method: 'get'
    })
}

export function getMenu() {
    return request({
        url: '/changgou-sys/sys/user/queryResourceTreeByCurrentUser',
        method: 'get'
    })
}

export function getButtons() {
    return request({
        url: '/changgou-sys/sys/user/queryPermissionByCurrentUser',
        method: 'get'
    })
}

